package demo;

public class Text16 {
    public static void main(String[] args) {
        //如果x是回文整数，打印true,否则false
//        int x=12;
//        int ge=x%10;//2
//        int shi=x/10%10;//1
//
//        System.out.println(ge+shi);
        int x = 12321;
        //定义一个临时变量，用于比较
        int temp = x;//12321
        int num = 0;
        while (x != 0) {
            int ge = x % 10;//1
            x = x / 10;//1232
            num = num * 10 + ge;//1
        }
        System.out.println(num);
        System.out.println(num==temp);
    }
}
